<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<title>美瀛商旅-员工中心</title>
    <script type="text/javascript">
	$(function() {
		applyDate("datepicker1");
		applyDate("datepicker");

	});

	</script>
<script language="javascript">
function czopen(){   
            document.getElementById("check_see").style.display="block" ;}	
function czclose(){   
            document.getElementById("check_see").style.display="none" ;}	
            
function submitQuery(){
	var beginTime=$("#datepicker1").val();
	var endTime=$("#datepicker").val();
	if(beginTime==null||beginTime==""){
		alert("交易起始时间不能为空！");
		return false;
	}
	if(endTime==null||endTime==""){
		alert("交易截止时间不能为空！");
		return false;
	}
	var miStart=Date.parse(beginTime.replace(/\-/g, '/ ')); 
	var miEnd=Date.parse(endTime.replace(/\-/g, '/ ')); 
	var date=(miEnd-miStart)/(1000*24*3600);
	if(date>30){
		alert("统计销售汇总数据不能超过30天！");
		return false;
	}else{
		var url=__ctxPath+"/admin/order/report.do?cmd=saleTotal&beginTime="+beginTime+"&endTime="+endTime;
		location.href=url;
	}
}            
</script>

</head>

<body>

	
	
	 <ul>
          <li class="titleonly">
          <img src="${ctxPath}/css/style/base/image/dot.gif" width="15" height="16" class="dot" />&gt;&gt;销售汇总报表搜索
        </li>
        </ul>
        <ul>
        <table width="700" border="0" cellspacing="0" cellpadding="0" class="dd">
		  <tr>
		    <td>交易起始时间: </td>
		    <td> <input name="beginTime" type="text" class="inputbox120" id="datepicker1" /></td>
		    <td>交易截止时间：</td>
		    <td><input name="endTime" type="text" class="inputbox120" id="datepicker" /></td>
		  </tr>
		  <tr>
		    <td colspan="6" style="text-align:center"><input name="Submit" type="submit" class="inputsubmit" value="查询" onclick="submitQuery();"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      <input name="Submit2" type="submit" class="inputsubmit" value="导出" /></td>
		  </tr>
		</table>
 </ul>
	<ul>
	  <li class="titleonly"><img src="${ctxPath}/css/style/base/image/dot.gif" width="15" height="16" class="dot" />&gt;&gt;销售汇总报表
    </li>
	</ul>
	<ul>
	  <li>
	  
		<display:table name="bOrders" sort="external" pagesize="${bOrders.objectsPerPage}"
			cellpadding="0" cellspacing="0" style="width:98%" export="true" 
			 id="bOrderItem" partialList="false" size="${bOrders.fullListSize}" requestURI="report.do">
			<display:column titleKey="日期" sortName="createTime" sortable="true" class="tableinfo center">
				<c:if test="${bOrderItem.cabin!=null}">
				<fmt:formatDate value="${bOrderItem.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
				</c:if>
				<c:if test="${bOrderItem.cabin==null}">
				<fmt:formatDate value="${bOrderItem.createTime}" pattern="yyyy-MM-dd" />
				</c:if>
			</display:column> 
			<display:column titleKey="订单号" sortable="true" sortName="orderNo" class="tableinfo center">
				<c:if test="${bOrderItem.orderNo!=null}">${bOrderItem.orderNo}</c:if><c:if test="${bOrderItem.orderNo==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="支付成功票量" sortable="true" sortName="payCount" class="tableinfo center">
				<c:if test="${bOrderItem.payCount!=null}">${bOrderItem.payCount}</c:if><c:if test="${bOrderItem.payCount==null}">&nbsp;</c:if>
			</display:column>	
			<display:column titleKey="退票量" sortable="true" sortName="faultCount" class="tableinfo center">
				<c:if test="${bOrderItem.faultCount!=null}">${bOrderItem.faultCount}</c:if><c:if test="${bOrderItem.faultCount==null}">&nbsp;</c:if>
			</display:column>	
			<display:column titleKey="销售净额（不含税金）" sortable="true" sortName="allPrice" class="tableinfo center">
				<c:if test="${bOrderItem.allPrice!=null}">${bOrderItem.allPrice}</c:if><c:if test="${bOrderItem.allPrice==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="机场建设费金额  " sortable="true" sortName="allPrice" class="tableinfo center">
				<c:if test="${bOrderItem.constructionFee!=null}">${bOrderItem.constructionFee}</c:if><c:if test="${bOrderItem.constructionFee==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="燃油税金额  " sortName="fuelTax" sortable="true" class="tableinfo center">
				<c:if test="${bOrderItem.fuelTax!=null}">${bOrderItem.fuelTax}</c:if><c:if test="${bOrderItem.fuelTax==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="退款净额（即不含税金的票面额）  " sortable="true" sortName="returnPrice" class="tableinfo center">
				<c:if test="${bOrderItem.returnPrice!=null}">${bOrderItem.returnPrice}</c:if><c:if test="${bOrderItem.returnPrice==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="退机场建设费金额   " sortable="true" sortName="returnConstructionFee" class="tableinfo center">
				<c:if test="${bOrderItem.returnConstructionFee!=null}">${bOrderItem.returnConstructionFee}</c:if><c:if test="${bOrderItem.returnConstructionFee==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="退燃油税金额  " sortable="true" sortName="retrunFuelTax" class="tableinfo center">
				<c:if test="${bOrderItem.retrunFuelTax!=null}">${bOrderItem.retrunFuelTax}</c:if><c:if test="${bOrderItem.retrunFuelTax==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="退款金额  " sortable="true" sortName="returnAllPrice" class="tableinfo center">
				<c:if test="${bOrderItem.returnAllPrice!=null}">${bOrderItem.returnAllPrice}</c:if><c:if test="${bOrderItem.returnAllPrice==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="退票费  " sortable="true" sortName="returnTicketPrice" class="tableinfo center">
				<c:if test="${bOrderItem.returnTicketPrice!=null}">${bOrderItem.returnTicketPrice}</c:if><c:if test="${bOrderItem.returnTicketPrice==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="快递费   " sortable="true" sortName="xcdPrice" class="tableinfo center">
				<c:if test="${bOrderItem.xcdPrice!=null}">${bOrderItem.xcdPrice}</c:if><c:if test="${bOrderItem.xcdPrice==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="汇总(收入)金额   " sortable="true" sortName="totalPrice" class="tableinfo center">
				<c:if test="${bOrderItem.totalPrice!=null}">${bOrderItem.totalPrice}</c:if><c:if test="${bOrderItem.totalPrice==null}">&nbsp;</c:if>
			</display:column>
			<display:column titleKey="舱位"sortable="true" sortName="cabin" class="tableinfo center">
				<c:if test="${bOrderItem.cabin!=null}">${bOrderItem.cabin}</c:if><c:if test="${bOrderItem.cabin==null}">&nbsp;</c:if>
			</display:column>
		</display:table>	
	</body>
</html>